package sv.gob.mtps.colectivas.model;

// Generated Dec 29, 2013 5:35:54 PM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbActa generated by hbm2java
 */
@Entity
@Table(name = "tb_acta")
public class TbActa implements java.io.Serializable {

	private Integer idActa;
	private TbExpediente tbExpediente;
	private TbTipoActa tbTipoActa;
	private Date fechaActa;
	private String delegado;

	public TbActa() {
	}

	public TbActa(TbExpediente tbExpediente, TbTipoActa tbTipoActa) {
		this.tbExpediente = tbExpediente;
		this.tbTipoActa = tbTipoActa;
	}

	public TbActa(TbExpediente tbExpediente, TbTipoActa tbTipoActa,
			Date fechaActa, String delegado) {
		this.tbExpediente = tbExpediente;
		this.tbTipoActa = tbTipoActa;
		this.fechaActa = fechaActa;
		this.delegado = delegado;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_acta", unique = true, nullable = false)
	public Integer getIdActa() {
		return this.idActa;
	}

	public void setIdActa(Integer idActa) {
		this.idActa = idActa;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "expediente", nullable = false)
	public TbExpediente getTbExpediente() {
		return this.tbExpediente;
	}

	public void setTbExpediente(TbExpediente tbExpediente) {
		this.tbExpediente = tbExpediente;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tipo_acta", nullable = false)
	public TbTipoActa getTbTipoActa() {
		return this.tbTipoActa;
	}

	public void setTbTipoActa(TbTipoActa tbTipoActa) {
		this.tbTipoActa = tbTipoActa;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "fecha_acta", length = 19)
	public Date getFechaActa() {
		return this.fechaActa;
	}

	public void setFechaActa(Date fechaActa) {
		this.fechaActa = fechaActa;
	}

	@Column(name = "delegado")
	public String getDelegado() {
		return this.delegado;
	}

	public void setDelegado(String delegado) {
		this.delegado = delegado;
	}

}
